﻿namespace Neo4jConnect.Test
{
    using System;
    using System.Linq;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Neo4jConnect.Plugins;

    [TestClass]
    public class TestBase
    {
        public static Uri Neo4jUri = new Uri("http://localhost:7474/db/data/");
        
        public void DeleteDatabase()
        {
            var graphDb = new GraphDatabaseService(Neo4jUri);
            foreach (var node in graphDb.GetAllNodes().ToList())
            {
                node.DeleteWithRelationships();
            }
        }

        [TestInitialize]
        public void TestSetup()
        {            
        }

        [TestCleanup]
        public void TestCleanup()
        {
            DeleteDatabase();
        }
    }
}
